<script>
    import Vue from 'vue';
    export default Vue.extend({
        mpType: 'app',
        onLaunch() {
           
        let userInfo = uni.getStorageSync('userInfo');


      wx.setStorageSync('userInfo', JSON.stringify({"expire":43200,"userPhone":"13764174509","session_key":"WCOCEj4kVODoKXsQd8alQQ==","refereenextNum":0,"sxOrderSum":0,"userId":33,"shareNum":0,"token":"fz0jmvsqb18yt86m4klg58hyymlko7bs","shareIntegralNum":0,"nickName":"Ben","gender":1,"language":"zh_CN","city":"闸北","province":"上海","country":"中国","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKSspw2ribEx6OnfZSvcTVFm6pDVG3JZm0yGSAC9bNTAYw5Nn0NK3DwQWXXeG1qkjF4cUkeMkIzeSA/132"} ))

      
       
        
          if (uni.canIUse('getUpdateManager')) {
                const updateManager = wx.getUpdateManager()
                updateManager.onCheckForUpdate((res) =>{
                  
                  // 请求完新版本信息的回调
                  if (res.hasUpdate) {
                
                    updateManager.onUpdateReady( ()=> {
                      uni.showModal({
                        title: '更新提示',
                        content: '新版本已经准备好，是否重启应用？',
                        success: res=> {
                          
                          if (res.confirm) {
                            updateManager.applyUpdate()
                          }
                        }
                      })
                    })

                    updateManager.onUpdateFailed( ()=> {
                      // 新的版本下载失败
                      uni.showModal({
                        title: '已有新版本',
                        content: '新版本已经上线，请您删除当前小程序，重新搜索打开'
                      })
                    })
                  }
                })
        }
  
     
          
            if(userInfo.length){
              let globalData = this.$options['globalData'];
               globalData['userInfo'] = JSON.parse(userInfo);
              
              
                
            } 
        },
        onShow() {
            console.log('App Show')
        },
        onHide() {
            console.log('App Hide')
        },
        globalData:{
            userInfo:{},
            appId:'wx97c20502f2296a5c', 
            startPoint:{},
            salonId:'',
            query:{}
        }
    });
</script>

<style lang="scss">

  page{
    
    font-family:'PingFang sc',"Microsoft YaHei",'STHeiti','SimHei',Arial, sans-serif;
    

 }
 
  
.no-data{
  text-align: center;
  font-size:24rpx;
  color:#666;
}

.allow-left{
  height: 24rpx;
  width: 14rpx;
  display: inline-block;
}
checkbox{
 
  transform: scale(0.8,0.8);
}

 checkbox .wx-checkbox-input {
        margin-top: -3px;
         border-radius: 50%;
         display: inline-block;
         margin-right:10rpx;
         border-color:$my-main-color;
         overflow: hidden;
        
      }

      checkbox .wx-checkbox-input.wx-checkbox-input-checked {
        background: $my-main-color;
        color:#fff;
        overflow: hidden;
       
      }
      checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
        width: 28rpx;
        height: 28rpx;
        line-height: 28rpx;
        text-align: center;
        font-size: 22rpx;
        color: #fff;
        background: transparent;
        transform: translate(-50%, -50%) scale(1);
        -webkit-transform: translate(-50%, -50%) scale(1);
         overflow: hidden;
      }

      radio .wx-radio-input.wx-radio-input-checked{

          border-color:$my-main-color !important;

          background:$my-main-color !important;

      }
 
 .scroll-y{
   height: 100vh;
   width: 100%;
 }

 .rich-img{
   width: 100%;
   vertical-align: top;
 }

 button{
   &:after{
     border:0;
   }
 }

   .global-tab{
    display: flex;
    justify-content: space-between;
    height:88rpx;
    font-size:28rpx;
    padding:0 30rpx;
    line-height: 88rpx;
    background:#fff;
    position: relative;
   
    view{
        box-sizing: border-box;   
        color:#333;
    }
    .on{
        color:$my-main-color;
        border-bottom: 1rpx solid $my-main-color;
    }
}
 .beautycard{
    width: 345rpx;
    float:right;
    vertical-align: top;
    margin-bottom: 20rpx;
    &:nth-child(odd){
      float:left;
    }
  }


  .customize-title{
    text-align: center;
    margin-bottom: 50rpx;
    &-group{
        display: inline-block;
        line-height: 40rpx;
    }
    &-icon{
        width: 106rpx;
        height: 10rpx;
        vertical-align: middle;
    }
    &-name{
        font-size: 30rpx;
        color:#000;
        padding: 0 10rpx;
        display: inline;
        font-weight: bold;
    }
    
}



</style>
